import api from '../utils/api.js'
// 查询所有的购物车
export const getShopList = (params) => {
	return api.request({
		url: '/shoppingCart/selectAll',
		method: 'get',
		params
	})
}
// 删除购物车
export const delShopList = (data) => {
	return api.request({
		url: '/shoppingCart/deleteShoppingCart',
		method: 'get',
		data
	})
}
// 新增购物车
export const AddShopList = (data) => {
	return api.request({
		url: '/shoppingCart/saveShoppingCart',
		method: 'post',
		header:{
			token:false
		},
		data
	})
}
// 购物车编辑
export const updateShopList = (data) => {
	return api.request({
		url: '/shoppingCart/updateShoppingCart',
		method: 'post',
		data
	})
}
// 派发优惠券给指定用户
export const saveSpecificUcoupon = (data) => {
	return api.request({
		url: '/userCoupons/saveSpecificUcoupon',
		method: 'post',
		data
	})
}
// 查询优惠券列表
export const couponsQueryAll = (data) => {
	return api.request({
		url: '/coupons/queryAll',
		method: 'post',
		data
	})
}
// 派发优惠券给指定用户
export const couponsSave = (data) => {
	return api.request({
		url: '/coupons/save',
		method: 'post',
		data
	})
}